<?php 	
	include('connect.php');
	header('Access-Control-Allow-Origin: *');
	header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
	header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE');

	$rows = [];

	$sql = 'select user from admin';
	
	$result = $db->query($sql);

	if($result->num_rows > 0){
		while($row = $result->fetch_array(MYSQLI_ASSOC)){
			$rows[] = $row;
		}
	}

	echo json_encode($rows);
	
	



